<div class="span12">
    <fieldset>
        <div class="row">
            <p class="right">
                <a class="btn btn-primary" href="<?php echo base_url(); ?>backend/albums/create">
                    <i class="icon-plus icon-white"></i> Tạo Album mới
                </a>
            </p>
        </div>
        <div id="albumErrorMsg" class="alert alert-error hide"></div>
        <div id="albumSuccessMsg" class="alert alert-success hide"></div>
        <?php if (0) { ?>
        <div class="alert alert-info">Có <strong><?php //echo count($this->authors); ?></strong> kết quả tìm kiếm với từ khoá: "<strong><?php //echo $this->q; ?></strong>"</div>
        <?php } ?>
            <table class="table table-striped">
            <tr>        
                <th>Tên Albums</th>
                <th>Mô tả</th>
                <th>Chuyên mục</th>
                <th>Ngày tạo</th>
                <th>Số lượng ảnh</th>
                <th>Số lượt xem</th>
                <th>Trạng thái</th>
                <th>Thao tác</th>
            </tr>
            <?php foreach ($arrAlbum['data'] as $album) { ?>
            <tr id="row-album-id-<?php echo $album['album_id']; ?>">
                <td>
                    <a href="<?php echo base_url().'backend/albums/edit/id/'.$album['album_id']; ?>">
                        <?php echo $album['name']; ?>
                    </a>
                </td>
                <td><?php echo $album['info']; ?></td>
                <td>
                    <a href="<?php echo base_url().'backend/category#row-cate-id-'.$album['category_id']; ?>">
                        <?php echo $album['title']; ?>
                    </a>
                </td>
                <td><?php echo strftime('%d/%m/%Y', $album['create_date']); ?></td>
                <td><span class="badge"><?php echo $album['total_photo']; ?></span></td>
                <td><span class="badge badge-info"><?php echo $album['total_view']; ?></span></td>
                <td><?php echo ($album['status'] > 0) ? '<span class="label label-success">Enable</span>' : '<span class="label">Disable</span>'; ?></td>
                <td>
                    <a href="<?php echo base_url().'backend/albums/edit/id/'.$album['album_id']; ?>">Chỉnh sửa</a> / 
                    <a href="javascript:void(0);" onclick="return deleteAlbum(<?php echo $album['album_id']; ?>);">Xoá</a>
                </td>
            </tr>
            <?php } ?>
        </table>
    </fieldset>
</div>
<!-- The main application script -->
<script src="<?php echo base_url(); ?>static/js/be_albums.js"></script>